<template>
	<view class="mall-container">
		<uni-section title="商城菜单" type="line"></uni-section>
		<custom-menu :menuList="menuList"></custom-menu>
		<tab-bar tabIndex="/pages/mall/index"></tab-bar>
	</view>
</template>

<script>
	import store from '@/store'
	export default {
		name: 'mallIndex',
		data() {
			return {
				menuList: []
			}
		},
		created() {
			this.hanleChildrenMenu()
		},
		methods: {
			hanleChildrenMenu() {
				let menu = store.getters.menu.find(item=> item.path === '/pages/mall/index');
				if(menu.children) {
					this.menuList = menu.children;
				}
			}
		}
	}
</script>

<style scoped>
	.mall-container {
		padding: 10px;
		box-sizing: border-box;
	}
</style>